<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.bluesky.dreamer.entity.LoginMessage"%>
<%
String path = request.getContextPath();
LoginMessage login=(LoginMessage)request.getSession().getAttribute("loginsession");
%>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link href="../../nresources/default/css/portalet.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="<%=path %>/common/page/js/jquery.js"></script>
<SCRIPT LANGUAGE="JavaScript"> 
	function confirm(){
		var loginId=$("#loginIdNum").val();
		var showname=$("#shownameId").val();
		var loginPass=$("#loginPassId").val();
		var loginPass2=$("#loginPassId2").val();
		if(loginId=='' || loginId.length>6){
			alert("请填写登陆工号,工号的长度不超过6位!");
			$("#loginIdNum").focus();
			return false;
		}else if(showname==''){
			alert("请添加显示名称!");
			$("#shownameId").focus();
			return false;
		}else if(loginPass=='' || loginPass2==''){
			alert("请输入密码!");
			$("#loginPassId").focus();
			return false;
		}else if(loginPass!=loginPass2){
			alert("两次输入的密码不一致!");
			$("#loginPassId").focus();
			return false;
		}
		$("#messformId").submit();
	}
</SCRIPT>
</head>
<body>
<!-- 表单 Start -->
<DIV id="Operation_Table">
	<div class="title">
		<div class="titleleft">用户添加</div>
		<!-- 表单title -->
	</div>
	<!-- 表单title -->
	<!-- 表单内容 Start-->
	<div id="Info_table">
	   <form action="sys!save.do" name="messform" id="messformId" method="post">
		<table border="0" cellpadding="0" cellspacing="0" width="100%">
			<tr>
				<th width="120">用户工号：</th>
				<td colspan="3" >
			    <input type="text" name="loginId" id="loginIdNum" width="70%">(长度不超过6位,如hz8888)</td>
		    </tr>
			<tr>
				<th>联系地址：</th>
				<td colspan="3"><textarea name="contactAddr" id="contactAddrId" cols="45" rows="5"></textarea>
			    (限定字数：400)</td>
            </tr>
			<tr>
				<th nowrap >显示别名:</th>
				<td><input type="text" name="showname" id="shownameId"></td>
			    <th>电子邮件:</th>
			    <td><input type="text" name="email" id="emailId"></td>
			</tr>
			<tr>
				<th>是否禁用:</th>
				<td><input type="radio" name="state" id="radio2" value="0">
				  是
				    <input type="radio" name="state" id="radio2" value="1" checked>
			    否</td>
			    <th>联系电话:</th>
			   <td><input type="text" name="contactPhone" id="contactPhoneId"></td>
			</tr>
			<tr>
				<th>员工密码:</th>
				<td><input type="password" name="loginPass" id="loginPassId"></td>
			    <th>确认密码:</th>
			    <td><input type="password" name="loginPass2" id="loginPassId2"></td>
			</tr>
			<tr>
				<th>归属县分:</th>
				<td><input type="text" name="belongCountry" id="belongCountryId"></td>
			    <th>归属区域:</th>
			    <td><input type="text" name="belongArea" id="belongAreaId"></td>
			</tr>
		</table>
		</form>
	</div>
	<TABLE width="100%" border="0" cellpadding="0" cellspacing="0">
		<!-- 按扭背景 start -->
		<tr>
		  <td width="30" align="center" id="footer">
		  	<input name="confirmButton" id="confirmButton" type="button" class="buttonStyle" value="提交" onclick="javascript:confirm();">
			<input name="userInfoBtn" id="userInfoBtn" type="button" class="buttonStyle" value="查看列表" onClick="window.location.href='sys_user_list.jsp';" >
		</tr>
		<!-- 按扭背景 end -->
	</table>
	<!-- 表单内容 End -->
</DIV>
</body>
</body>
</html>
